\subsection{The King becoming Lost in Time}

A bug that was discovered during later stages of play testing was
that of losing the King in time.

The possibility of a King becoming Lost in Time had been briefly
considered, but dismissed as impossible, since a King can move at
most one turn forwards in time. When a piece moves forward in time
by one turn, it disappears, the opposing side has a move, and then
the time travelling piece reappears at its destination. Blocking is
thus impossible, because any opposing piece attempting to block
will simply be taken by the reappearing piece. A move forward of
one turn doesn't move `through' any intermediate spaces, so there
are no spaces which can be filled by an opposing piece attempting
to block it.

However, this thinking was incomplete. While it's true that it's
impossible to cause a King to become Lost in Time by blocking it,
that's not the only way a piece can become Lost in Time. A piece is
Lost in Time if a forward time travelling move it made is rendered
illegal before it is complete. So if a piece moves forward in time
to a position which is already occupied with a piece of the same
colour, the time travelling piece becomes Lost in Time, because
it's not legal to take a piece of the same colour.

With a King this almost certainly has to be done deliberately,
since the only way it could happen is if the King is moved one
forward in time and one position in space, to a space directly
`above' an existing piece of the same colour. It should be clear to
the player making the move that as soon as the opposition has its
turn, the piece the King is `over' will still be there when the
King tries to reappear, which makes the move illegal and renders
the King Lost in Time. This move is so clearly stupid that I had
never thought to try it. There's a lesson here about the benefits
of play testing.

So, when the play tester made this stupid move, their King became
Lost in Time. But because Lost in Time pieces are not `captured',
just gone, the system did not detect any problems. The King was not
on the board, but it wasn't checkmated, so the game continued. Not
only was the King not checkmated, it was now un-checkable from that
turn forwards, because it was no longer on the board! It was not a
stupid move at all, in fact it was probably the best move in the
game, rendering the King almost completely un-checkable!%
\footnote{It's worth noting that the King was not completely invulnerable, as
it could theoretically still be checked in the past before it made
the move that caused it to become Lost in Time.}
Clearly this was a game-breaking loophole of the kind I decided not
to allow in section \ref{nerf-foos}

I examined several possible solutions.

\begin{enumerate}
\item
  Don't allow the King to move to positions directly above pieces of
  the same colour.

  The problem with this is that it is \emph{possible} for this move
  to not result in the King becoming lost in time, since the piece
  can be captured in the intervening turn, making the King's move
  legal. This is extremely unlikely, since not only would the player
  need to decide to take the very risky move of moving their King
  forwards in time to directly above a piece of the same colour, but
  their opponent would have to then decide to capture that piece to
  make the move legal again. But however unlikely this is, it is
  legal, so declaring the all moves to directly above pieces of the
  same colour illegal would reduce the branching factor of the game
  unnecessarily, which goes against section
  \ref{keep-big-statespace}.

\item
  Make the King capture any piece it lands on when reappearing from
  time travel, even pieces of the same colour.

  This would be very simple to implement, and would fix the problem,
  but it has a wider reach than just making the King never be lost in
  time. It introduces a strange precedent of deliberately taking your
  own pieces, which is inelegant and divergent from chess, going
  against section \ref{true-to-chess}

\item
  State that if a King becomes lost in time, the game is lost by the
  owner of the King.

  This is the solution I chose. It keeps options open, and doesn't
  change the rest of the game, but punishes players for deliberately
  causing their King to be Lost in Time.

\end{enumerate}
